<?php
//
//	file: includes/calendar/class_calendar_page_header.php
//	author: ptirhiik
//	begin: 03/02/2007
//	version: 1.6.0 - 03/02/2007
//	license: http://opensource.org/licenses/gpl-license.php GNU General Public License (GPL)
//

if ( !defined('IN_PHPBB') )
{
	die('Hacking attempt');
}

// includes/page_header
class calendar_page_header extends plug_ins
{
	function start()
	{
		global $config, $template, $user;
		global $gen_simple_header;

		// menu
		$template->assign_vars(array(
			'U_CALENDAR' => $config->url('calendar', '', true),
			'L_CALENDAR' => $template->lang('Calendar'),
			'I_CALENDAR' => $template->img('menu_calendar'),
			'L_CALENDAR_ALT' => $template->lang('Calendar_event'),
		));
		$template->set_switch('topic_calendar');

		if ( !defined('HAS_DIED') && !defined('IN_CALENDAR') && !defined('IN_LOGIN') && !defined('IN_INSTALL') && !$gen_simple_header )
		{
			if ( (isset($config->data['calendar_header_cells']) && intval($config->data['calendar_header_cells'])) || (isset($user->data['user_calendar_header_cells']) && intval($user->data['user_calendar_header_cells']) && !(isset($config->data['calendar_header_cells_over']) && intval($config->data['calendar_header_cells_over']))) )
			{
				include($config->url('includes/calendar/class_calendar_handler'));
				$calendar_header_box = new calendar_header_box(INDEX);
				$calendar_header_box->display();
				$calendar_header_box->destroy();
				unset($calendar_header_box);
			}
		}
		return true;
	}
}

?>